show users;

db.createUser({
    user: "user123",
    pwd: "user123",
    roles: [

        {
            role: 'readWriteAnyDatabase',
            db: "admin"
        }
    ]
});
db.createUser({
    user: "user1",
    pwd: "user123",
    roles: [{
            role: 'readWrite',
            db: "blogs"
        },
        {
            role: 'dbAdmin',
            db: "blogs"
        }
    ]
});
db.dropUser("user123")

db.updateUser("admin123", {
    roles: [{
            role: "userAdminAnyDatabase",
            db: "admin"
        },
        {
            role: "dbAdminAnyDatabase",
            db: "admin"
        },
        {
            role: 'readWriteAnyDatabase',
            db: "admin"
        }
    ]
});